<?php

declare(strict_types=1);

namespace App\Command;

use Hyperf\Command\Command as HyperfCommand;
use Hyperf\Command\Annotation\Command;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Input\InputArgument;

#[Command]
class TestDataCommand extends HyperfCommand
{
    public function __construct(protected ContainerInterface $container)
    {
        parent::__construct('gen:test-user');
    }

    public function configure()
    {
        parent::configure();
        $this->setDescription('Hyperf Demo Command');
    }

    public function handle()
    {
        $params = $this->input->getArguments();
        print_r($params);
    }

    protected function getArguments()
    {
        return [
            ['user_type', InputArgument::REQUIRED, '用户类型 1-普通用户 2-主播 3-专家'],
            ['username', InputArgument::REQUIRED, '用户名'],
            ['account', InputArgument::REQUIRED, '帐号 支持手机号码和邮箱'],
            ['avatar', InputArgument::OPTIONAL, '头像地址']
        ];
    }
}
